/*
 * Element.h
 *
 *  Created on: May 29, 2011
 *      Author: gilang
 */

#ifndef ELEMENT_H_
#define ELEMENT_H_

#define LINE 2
#define TRIANGULAR 3
#include <string>

#include "Node.h"
#include "Matrix.h"
#include "Vector.h"
#include "Material.h"

using namespace std;


class Element {
protected:
	Node *node;
	Element *before;
	Element *next;
	double elementDim;
	Matrix<double> stiffMatrix;
	Vector<double> loadVector;
	Material material;
	string label;
public:

    virtual Node *getNode() const=0;
    virtual void setNode(Node *node)=0;
    virtual Element * getNext()=0;
    virtual void setNext(Element *next)=0;
    virtual Element * getBefore()=0;
    virtual void setBefore(Element *before)=0;
    virtual void setElementDim(double ed)=0;
    virtual double getElementDim()=0;
    virtual Vector<double> & getLoadVector()=0;
    virtual Matrix<double> & getStiffMatrix()=0;
    virtual void setLoadVect(const Vector<double> &v)=0;
    virtual void setStiffMatrix(const Matrix<double> &m)=0;
    virtual double operator()(int i,int j)=0;
    virtual Element& operator=(Element& el)=0;
    virtual Node get(int i)=0;
    virtual void addNode(int i,const Node &n)=0;
    virtual void setMaterial(const Material &mat)=0;
    virtual Material & getMaterial()=0;
    virtual void setLabel(const string &s)=0;
    virtual string getLabel()=0;
    virtual double operator[](const int i)=0;

};



#endif /* ELEMENT_H_ */
